package com.kongyz.filter;

import com.kongyz.Person;

import java.util.ArrayList;
import java.util.List;

/**
 * @author kongyz
 * @date 2018/6/27 21:53
 * @Description: 女性筛选
 */
public class CriteriaFemale implements Criteria {
    public List<Person> meetCriteria(List<Person> personList) {
        List<Person> femalePersons=new ArrayList<Person>();
        for (Person person:personList){
            if(person.getGender().equalsIgnoreCase("女")){
                femalePersons.add(person);
            }
        }
        return femalePersons;
    }
}
